import { defineStore } from 'pinia'

interface AppStoreType {
  layout: 'renderTopLeft' | 'renderLeft' | 'renderTop'
}

export const useAppStore = defineStore('app', {
  state: (): AppStoreType => ({
    layout: 'renderLeft'
  }),
  getters: {
    getLayout: state => state.layout
  },
  actions: {
    setLayout(layout: 'renderTopLeft' | 'renderLeft' | 'renderTop') {
      this.layout = layout
    }
  }
})
